<template>
  <div>
    <gs-header :title="pageTitle"/>
    <div id="page-scroll-y-wrapper" class="page-scroll-y-wrapper">
      <div class="scroll-content">
        <ul class="scroll-list">
          <li v-for="i in 100" :key="i" class="item">I'm a scroll line ({{i}})</li>
        </ul>
      </div>
    </div>
  </div>
</template>

<script>
import GsHeader from 'example/components/gs-header/gs-header'
import GScroll from 'src'

export default {
  name: 'PageScrollY',
  components: {
    GsHeader
  },
  mounted () {
    this.scroll = new GScroll('page-scroll-y-wrapper')
  },
  data () {
    return {
      pageTitle: '垂直滚动'
    }
  }
}
</script>

<style lang="scss">
.page-scroll-y-wrapper {
  height: calc(100vh - 45px);
  overflow: hidden;
  .scroll-content {
    .scroll-list {
      .item {
        padding: 15px;
        font-size: 16px;
        color: rgba(0, 0, 0, 0.5);
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        user-select: none;
        &:last-child {
          border-bottom: none;
        }
      }
    }
  }
}
</style>
